<%@ include file="../base.jsp"%>
<%@ include file="../checkLogin.jsp"%>

<head>
<title>Clientes</title>
<style type="text/css">
.boxTable {
width: 110%;
padding-left: 0em;
padding-right: 0em;
}
.tableSee{
margin-left: 0em;
margin-right: 0em;
width: 100%;
}
#sendClienteRemove {
padding: 0em;
}
</style>
</head>

<body>
<a class="backButton" href="${pageContext.request.contextPath}/pages/menu.jsp"><s:text name="button.back"/></a>
<div class="boxHeader">
<h2  class="formTitle">
	<s:text name="cliente.see.title" />
</h2>
<p class="formInstructions" style="border-bottom: 1px solid #AAA;">
	<s:text name="cliente.see.instructions" />
</p>
</div>
<s:if test="!clientes.isEmpty()">
<div class="boxTable">
		<s:form action="sendClienteRemove" method="post" namespace="/" theme="simple">
			<s:hidden name="idToEdit" value=""></s:hidden>
			<table class="tableSee">
				<tr>
					<th>&nbsp;</th>
					<th>ID</th>
					<th>Razao Social</th>
					<th>Nome Fantasia</th>
					<th>Logradouro</th>
					<th>Numero</th>
					<th>Complemento</th>
					<th>Bairro</th>
					<th>Cidade</th>
					<th>Estado</th>
					<th>CEP</th>
					<th>CNPJ</th>
					<th>Inscricao Estadual</th>
					<th>Telefone 1</th>
					<th>Telefone 2</th>
					<th>E-mail</th>
					<th>Comprador</th>
				</tr>
		      <s:iterator value="clientes" status="rowstatus">
		        <tr <s:if test="#rowstatus.odd">class="odd"</s:if><s:else>class="even"</s:else>>
		          <td>
		            <s:checkbox name="clienteCheckbox" fieldValue="%{idCliente}" value="false"/>
	            
		          </td>
		     
   				  <td>
		           <!--  <a title="Editar" href="javascript:editObject(%{#rowstatus.index}, 'sendClienteRemove', 'Cliente');" >-->
		            <s:property value="idCliente" />
		            <!--  </a>-->
		          </td>
		          <td>
		            <s:property value="razaoSocial" />
		          </td>
		          <td>
		            <s:property value="nomeFantasia" />
		          </td>
		          <td>
		            <s:property value="logradouro" />
		          </td>
		          <td>
		            <s:property value="numero" />
		          </td>
		          <td>
		            <s:property value="complemento" />
		          </td>
		          <td>
		            <s:property value="bairro" />
		          </td>
		          <td>
		            <s:property value="cidade" />
	              </td>
		          <td>
		            <s:property value="estado" />
	              </td>
		          <td>
		            <s:property value="cep" />
		          </td>
		          <td>
		            <s:property value="cnpj" />
	              </td>
		          <td>
		            <s:property value="inscricaoEstadual" />
	              </td>
		          <td>
		            <s:property value="telefone1" />
	              </td>
	              <td>
		            <s:property value="telefone2" />
	              </td>
	              <td>
		            <s:property value="email" />
	              </td>
	              <td>
		            <s:property value="comprador" />
	              </td>
		         
	              
		        </tr>
		      </s:iterator>
		    </table>	
			<s:submit method="execute" key="button.remove" align="center" />
		</s:form>
</div>
</s:if>
<s:if test="clientes.isEmpty()">
	<div align="center">
		<div class="ui-state-error ui-corner-all"
			style="padding: 0 .7em; width: 30%; margin: 3em; box-shadow:0px 0px 20px #a33;">
			<span class="ui-icon ui-icon-alert"
				style="float: left; margin-right: .3em;"></span>
			<s:text name="warning.noobjectstosee" />
		</div>
	</div>
</s:if>
	<s:if test="hasActionErrors()">
		<div align="center">
			<div class="ui-state-error ui-corner-all"
				style="padding: 0 .7em; width: 30%; margin: 3em; box-shadow:0px 0px 20px #a33;">
				<span class="ui-icon ui-icon-alert"
					style="float: left; margin-right: .3em;"></span>
				<s:actionerror />
			</div>
		</div>
	</s:if>
	<s:if test="hasActionMessages()">
		<div align="center">
			<s:actionmessage/>
		</div>
	</s:if>
	

</body>
